<?php

namespace App\Http\Controllers;

use App\Cate;
use App\GoodImage;
use App\Goods;
use Illuminate\Http\Request;

class IndexController extends Controller
{
    //
    public function index(GoodImage $goodImage)
    {
        $goods = new Goods();
        $goodses = $goods->hotGoods();
        $bannerImages = $goodImage -> banner();
        $cates = Cate::all();
        $best = $goods->best();

        $newGoodses = $goods->is_new();

        return view("index.index",compact("cates","goodses","bannerImages","best","newGoodses"));
    }
}
